<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="Public/Admin/css/bootstrap.min.css" />
	<link rel="stylesheet" href="Public/Admin/css/common.css" />
	<script type="text/javascript" src='Public/Admin/js/jquery-1.8.2.min.js'></script>
	<style type="text/css">
		body{
			margin-bottom: 100px;
		}
	</style>

</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	
	<form id="sub" action="" method='post'>

		<table class='table table-bordered table-hover'>
			<tr class="endtr">
				<th>货品ID</th>
				<?php foreach ($arr as $v){?>
				<th width="100"><?php echo $v[0]['taname']?></th>
				<?php }?>
				<th>库存</th>
				<th>货号</th>
				<th>操作</th>
			</tr>
			<!-- 如果已添加数目小于可能情况数目，才出现添加货品的输入框 -->
		
			<tr class="info">
				<td>添加货品</td>
				<?php $b=0;?>			
				<?php foreach ($arr as $k=>$v){?>					
					<td>
						<select name="connectid[]">
							<option value="0">-请选择-</option>
							<?php foreach ($v as $kk=>$vv){?>															
								<option <?php if($goodlistdata['connectid'][$b]==$vv['gaid']){?>
                selected
               <?php }?>  value="<?php echo $vv['gaid']?>"><?php echo $vv['gavalue']?></option>								
							<?php }?>
						</select>
					</td>
				<?php $b++; ?>
				<?php }?>
				<td>
					<input value="<?php echo $goodlistdata['plstock']?>" type="text" name='plstock'/>
				</td>
				<td>
					<input value="<?php echo $goodlistdata['plorder']?>"  type="text" name='plorder' />
				</td>
				<td></td>
			</tr>
			
		</table>

	
		<input type="hidden" name='plid' value="<?php echo $goodlistdata['plid']?>" />		
		<input type="submit" value='保存添加' class="btn btn-primary"/>
	</form>
	

	</div>
	</div>
	</div>


</body>
</html>